//
//  WYJSearchView.swift
//  MySinaWeibo
//
//  Created by eastriver on 16/10/2.
//  Copyright © 2016年 believewilliam. All rights reserved.
//

import UIKit

@IBDesignable class WYJSearchView: UIButton {
    
    // 加载xib文件
    class func loadSearchView() -> WYJSearchView {
        let nib = UINib(nibName: "WYJSearchView", bundle: nil)
        let searchView = nib.instantiate(withOwner: nil, options: nil).last as! WYJSearchView
        
        return searchView
    }

    override func awakeFromNib() {
        self.imageEdgeInsets = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)
        self.bounds.size.width = UIScreen.main.bounds.width
        self.titleEdgeInsets = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 0)
        // 设置圆角
//        self.layer.cornerRadius = 17
//        self.layer.masksToBounds = true
    }

}
